<html layout:decorator="public/form" xmlns:miguo="http://www.w3.org/1999/html">
<div layout:fragment="content">
	<form class="layui-form model-form" action="" style="width:80%;">
		<input name="id" type="hidden" th:value="${info['id']}?:0">
		<div class="layui-form-item">
			<label class="layui-form-label">广告图片：</label>
			<widget:uploadSingleImage name="cover|图片|90x90|ad|建议上传尺寸450x450" th:value="${info['cover']}"/>
		</div>
		<div class="layui-form-item">
			<div class="layui-inline">
				<label class="layui-form-label">广告标题：</label>
				<div class="layui-input-inline">
					<input name="title" th:value="${info['title']}" lay-verify="required" autocomplete="off" placeholder="请输入广告标题" class="layui-input" type="text">
				</div>
			</div>
			<div class="layui-inline">
				<label class="layui-form-label">广告位：</label>
				<div class="layui-input-inline">
					<widget:singleSelect name="sortId|1|广告位|name|id" sql="SELECT id,`name` FROM sys_ad_sort WHERE mark=1 ORDER BY sort ASC;" th:value="${info['sortId']}?:0"/>
				</div>
			</div>
		</div>
		<div class="layui-form-item">
			<div class="layui-inline">
				<label class="layui-form-label">广告格式：</label>
				<div class="layui-input-inline">
					<widget:singleSelect name="type|1|广告格式|name|id" th:data="${AD_TYPE_LIST}" th:value="${info['type']}?:0"/>
				</div>
			</div>
			<div class="layui-inline">
				<label class="layui-form-label">广告描述：</label>
				<div class="layui-input-inline">
					<input name="description" th:value="${info['description']}" lay-verify="required" autocomplete="off" placeholder="请输入广告描述" class="layui-input" type="text">
				</div>
			</div>
		</div>
		<div class="layui-form-item">
			<div class="layui-inline">
				<label class="layui-form-label">广告链接：</label>
				<div class="layui-input-inline">
					<input name="url" th:value="${info['url']}" lay-verify="required" autocomplete="off" placeholder="请输入广告链接" class="layui-input" type="text">
				</div>
			</div>
			<div class="layui-inline">
				<label class="layui-form-label">点击次数：</label>
				<div class="layui-input-inline">
					<input name="viewNum" th:value="${info['viewNum']}" lay-verify="required|number" autocomplete="off" placeholder="请输入广告点击次数" class="layui-input" type="text">
				</div>
			</div>
		</div>
		<div class="layui-form-item">
			<div class="layui-inline">
				<label class="layui-form-label">广告高度：</label>
				<div class="layui-input-inline">
					<input name="height" th:value="${info['height']}" lay-verify="required|number" autocomplete="off" placeholder="请输入广告高度" class="layui-input" type="text">
				</div>
			</div>
			<div class="layui-inline">
				<label class="layui-form-label">广告宽度：</label>
				<div class="layui-input-inline">
					<input name="width" th:value="${info['width']}" lay-verify="required|number" autocomplete="off" placeholder="请输入广告宽度" class="layui-input" type="text">
				</div>
			</div>
		</div>
		<div class="layui-form-item">
			<div class="layui-inline">
				<label class="layui-form-label">开始时间：</label>
				<div class="layui-input-inline">
					<widget:dateSelect name="startTime|开始时间|datetime" th:value="${info['startTime']}"/>
				</div>
			</div>
			<div class="layui-inline">
				<label class="layui-form-label">结束时间：</label>
				<div class="layui-input-inline">
					<widget:dateSelect name="endTime|结束时间|datetime" th:value="${info['endTime']}"/>
				</div>
			</div>
		</div>
		<div class="layui-form-item">
			<div class="layui-inline">
				<label class="layui-form-label">状态：</label>
				<div class="layui-input-inline">
					<widget:switchCheck name="status" data="在用|停用" th:value="${info['status']} ?: 1"/>
				</div>
			</div>
			<div class="layui-inline">
				<label class="layui-form-label">排序：</label>
				<div class="layui-input-inline">
					<input name="sort" th:value="${info['sort']}" lay-verify="required|number" autocomplete="off" placeholder="请输入排序" class="layui-input" type="text">
				</div>
			</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label">广告内容：</label>
			<div class="layui-input-block">
				<textarea name="content" placeholder="请输入广告内容" class="layui-textarea" th:text="${info['content']}"></textarea>
				<widget:kindEditor name="content" type="default" dirname="ad" width="80%" height="350"/>
			</div>
		</div>
		<widget:btnSubmit name="submit|立即保存,close|关闭"/>
	</form>
</div>
</html>